﻿package chapter_07_Homework;

import java.util.Scanner;

/*
 * 		求数组最大值。
 */
public class Work_03 {
	public static void main(String[] args) {
		int[] scores = new int[5];
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入5位学员的成绩：");
		for (int i = 0; i < scores.length; i++) {
			scores[i] = sc.nextInt();;	
		}
		int max = scores[0];
		for (int j = 1; j < scores.length; j++) {
			if(scores[j]>max){
				max = scores[j];
			}
		}
		System.out.println("最大值是："+max);
	}
}
